Optimal. Leaf size=116 \[ -\frac {9 x}{8 a^2}+\frac {2 \tanh ^{-1}(\cos (c+d x))}{a^2 d}-\frac {2 \cos (c+d x)}{a^2 d}-\frac {2 \cos ^3(c+d x)}{3 a^2 d}-\frac {\cot (c+d x)}{a^2 d}+\frac {\cos (c+d x) \sin (c+d x)}{8 a^2 d}-\frac {\cos (c+d x) \sin ^3(c+d x)}{4 a^2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.22, antiderivative size = 116, normalized size of antiderivative = 1.00, number of steps
used = 14, number of rules used = 8, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.276, Rules used = {2954, 2951,
3855, 3852, 8, 2718, 2715, 2713} \begin {gather*} -\frac {2 \cos ^3(c+d x)}{3 a^2 d}-\frac {2 \cos (c+d x)}{a^2 d}-\frac {\cot (c+d x)}{a^2 d}-\frac {\sin ^3(c+d x) \cos (c+d x)}{4 a^2 d}+\frac {\sin (c+d x) \cos (c+d x)}{8 a^2 d}+\frac {2 \tanh ^{-1}(\cos (c+d x))}{a^2 d}-\frac {9 x}{8 a^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2713
Rule 2715
Rule 2718
Rule 2951
Rule 2954
Rule 3852
Rule 3855
Rubi steps
\begin {align*} \int \frac {\cos ^6(c+d x) \cot ^2(c+d x)}{(a+a \sin (c+d x))^2} \, dx &=\frac {\int \cos ^2(c+d x) \cot ^2(c+d x) (a-a \sin (c+d x))^2 \, dx}{a^4}\\ &=\frac {\int \left (-a^6-2 a^6 \csc (c+d x)+a^6 \csc ^2(c+d x)+4 a^6 \sin (c+d x)-a^6 \sin ^2(c+d x)-2 a^6 \sin ^3(c+d x)+a^6 \sin ^4(c+d x)\right ) \, dx}{a^8}\\ &=-\frac {x}{a^2}+\frac {\int \csc ^2(c+d x) \, dx}{a^2}-\frac {\int \sin ^2(c+d x) \, dx}{a^2}+\frac {\int \sin ^4(c+d x) \, dx}{a^2}-\frac {2 \int \csc (c+d x) \, dx}{a^2}-\frac {2 \int \sin ^3(c+d x) \, dx}{a^2}+\frac {4 \int \sin (c+d x) \, dx}{a^2}\\ &=-\frac {x}{a^2}+\frac {2 \tanh ^{-1}(\cos (c+d x))}{a^2 d}-\frac {4 \cos (c+d x)}{a^2 d}+\frac {\cos (c+d x) \sin (c+d x)}{2 a^2 d}-\frac {\cos (c+d x) \sin ^3(c+d x)}{4 a^2 d}-\frac {\int 1 \, dx}{2 a^2}+\frac {3 \int \sin ^2(c+d x) \, dx}{4 a^2}-\frac {\text {Subst}(\int 1 \, dx,x,\cot (c+d x))}{a^2 d}+\frac {2 \text {Subst}\left (\int \left (1-x^2\right ) \, dx,x,\cos (c+d x)\right )}{a^2 d}\\ &=-\frac {3 x}{2 a^2}+\frac {2 \tanh ^{-1}(\cos (c+d x))}{a^2 d}-\frac {2 \cos (c+d x)}{a^2 d}-\frac {2 \cos ^3(c+d x)}{3 a^2 d}-\frac {\cot (c+d x)}{a^2 d}+\frac {\cos (c+d x) \sin (c+d x)}{8 a^2 d}-\frac {\cos (c+d x) \sin ^3(c+d x)}{4 a^2 d}+\frac {3 \int 1 \, dx}{8 a^2}\\ &=-\frac {9 x}{8 a^2}+\frac {2 \tanh ^{-1}(\cos (c+d x))}{a^2 d}-\frac {2 \cos (c+d x)}{a^2 d}-\frac {2 \cos ^3(c+d x)}{3 a^2 d}-\frac {\cot (c+d x)}{a^2 d}+\frac {\cos (c+d x) \sin (c+d x)}{8 a^2 d}-\frac {\cos (c+d x) \sin ^3(c+d x)}{4 a^2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.07, size = 128, normalized size = 1.10 \begin {gather*} \frac {\left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )^4 \left (-108 (c+d x)-240 \cos (c+d x)-16 \cos (3 (c+d x))-48 \cot \left (\frac {1}{2} (c+d x)\right )+192 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )-192 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )+3 \sin (4 (c+d x))+48 \tan \left (\frac {1}{2} (c+d x)\right )\right )}{96 d (a+a \sin (c+d x))^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.23, size = 164, normalized size = 1.41
method | result | size |
risch | \(-\frac {9 x}{8 a^{2}}-\frac {5 \,{\mathrm e}^{i \left (d x +c \right )}}{4 d \,a^{2}}-\frac {5 \,{\mathrm e}^{-i \left (d x +c \right )}}{4 d \,a^{2}}-\frac {2 i}{a^{2} d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}-\frac {2 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{a^{2} d}+\frac {2 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{a^{2} d}+\frac {\sin \left (4 d x +4 c \right )}{32 a^{2} d}-\frac {\cos \left (3 d x +3 c \right )}{6 d \,a^{2}}\) | \(138\) |
derivativedivides | \(\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-\frac {1}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}-4 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\frac {4 \left (\frac {\left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8}+4 \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\frac {7 \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8}+8 \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\frac {7 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8}+\frac {20 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3}-\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{8}+\frac {8}{3}\right )}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{4}}-\frac {9 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}}{2 d \,a^{2}}\) | \(164\) |
default | \(\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-\frac {1}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}-4 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\frac {4 \left (\frac {\left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8}+4 \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\frac {7 \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8}+8 \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\frac {7 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8}+\frac {20 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3}-\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{8}+\frac {8}{3}\right )}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{4}}-\frac {9 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}}{2 d \,a^{2}}\) | \(164\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 348 vs.
\(2 (108) = 216\).
time = 0.50, size = 348, normalized size = 3.00 \begin {gather*} -\frac {\frac {\frac {64 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {21 \, \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {160 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {57 \, \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} + \frac {192 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} + \frac {3 \, \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}} + \frac {96 \, \sin \left (d x + c\right )^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}} + \frac {9 \, \sin \left (d x + c\right )^{8}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{8}} + 6}{\frac {a^{2} \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {4 \, a^{2} \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {6 \, a^{2} \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} + \frac {4 \, a^{2} \sin \left (d x + c\right )^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}} + \frac {a^{2} \sin \left (d x + c\right )^{9}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{9}}} + \frac {27 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{2}} + \frac {24 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{2}} - \frac {6 \, \sin \left (d x + c\right )}{a^{2} {\left (\cos \left (d x + c\right ) + 1\right )}}}{12 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.39, size = 113, normalized size = 0.97 \begin {gather*} -\frac {6 \, \cos \left (d x + c\right )^{5} - 9 \, \cos \left (d x + c\right )^{3} + {\left (16 \, \cos \left (d x + c\right )^{3} + 27 \, d x + 48 \, \cos \left (d x + c\right )\right )} \sin \left (d x + c\right ) - 24 \, \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) + 24 \, \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) + 27 \, \cos \left (d x + c\right )}{24 \, a^{2} d \sin \left (d x + c\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.48, size = 186, normalized size = 1.60 \begin {gather*} -\frac {\frac {27 \, {\left (d x + c\right )}}{a^{2}} + \frac {48 \, \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right )}{a^{2}} - \frac {12 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{2}} - \frac {12 \, {\left (4 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right )}}{a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )} + \frac {2 \, {\left (3 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 96 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} - 21 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 192 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 21 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 160 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 3 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 64\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{4} a^{2}}}{24 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 9.21, size = 279, normalized size = 2.41 \begin {gather*} \frac {9\,\mathrm {atan}\left (\frac {9\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\frac {81\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{16}-9}+\frac {81}{16\,\left (\frac {81\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{16}-9\right )}\right )}{4\,a^2\,d}-\frac {2\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{a^2\,d}-\frac {\frac {3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8}{2}+16\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6}{2}+32\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+\frac {19\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{2}+\frac {80\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{3}+\frac {7\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{2}+\frac {32\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{3}+1}{d\,\left (2\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9+8\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+12\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+8\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+2\,a^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}+\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,a^2\,d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________